//
//  Util.h
//  HNLogistics
//
//  Created by 蒋宇 on 14/12/1.
//  Copyright (c) 2014年 蒋宇. All rights reserved.
//

#import <Foundation/Foundation.h>
typedef void(^Back)(id info);
//#import "JZ320Library.h"

@import UIKit;

#define IS_OS_6_OR_LATER    ([[[UIDevice currentDevice] systemVersion] floatValue] >= 6.0)
#define IS_OS_7_OR_LATER    ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)
#define IS_OS_8_OR_LATER    ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)



// Cell布局
#define CELL_PADDING_10 10
#define CELL_PADDING_8  8
#define CELL_PADDING_6  6
#define CELL_PADDING_4  4
#define CELL_PADDING_2  2



/**
 * Creates an opaque UIColor object from a byte-value color definition.
 */
#define RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:1]

/**
 * Creates a UIColor object from a byte-value color definition and alpha transparency.
 */
#define RGBACOLOR(r,g,b,a) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:(a)]

#define DEFAUTLT_BACKGROUND_COLOR RGBCOLOR(16, 191, 229)
#define DEFAUTLT_CONTROLLER_BACKGROUND_COLOR RGBCOLOR(244, 244, 244)


#define FONT_TAHOMA_YAHEI(kSize) [UIFont fontWithName:@"MicrosoftYaHei-Tahoma" size:(kSize)]

#define MAIN_SCREEN_SIZE [[UIScreen mainScreen] bounds].size

#define APPKEY @"556566ab67e58e1035002914"
#define IOS_7_OR_LATER    ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)
#define IOS_8_OR_LATER    ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)

@interface Util : NSObject

+ (UIViewController *)controllerFromMainStoryboardWithIdentifierID:(NSString *)identifierID;
+ (void)presentNaviC:(UIViewController *)sourceC fromController:(UIViewController *)fromC;
+ (void)presentLoginControllerFromViewController:(UIViewController *)con;
+ (void)changeNSString:(NSString *)str;

+(NSString *)getstrWithsportEventId:(NSString *)sportEventId;

+(NSString *)getstrWithstarNum:(NSString *)starNum;

+(NSString *)getstrWithSex:(NSString *)sex;
+(NSString *)getsexWithImg:(NSString *)Img;

+ (NSString*)weekdayStringFromDate:(NSDate*)inputDate;

+ (NSString*)serviceItem:(NSString *)serviceItem;
+ (NSString*)serviceStr:(NSString *)serviceStr;
+ (NSString*)levelWithstr:(NSString *)str;
+ (NSString*)strWithlevel:(NSString *)level;

+ (UIButton *)warBtnWithNum:(NSString *)Num;

+ (void)showHud:(NSString *)title;

@end
